package com.smartlifev30.baiwei.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.ArrayList;

/**
 * 安防
 *
 * @author tys
 * @date 2018/8/20
 */

public class ZoneFragmentAdapter extends FragmentPagerAdapter {
    private final ArrayList<Fragment> fragments;

    public ZoneFragmentAdapter(FragmentManager fragmentManager, ArrayList<Fragment> fragments) {
        super(fragmentManager);
        this.fragments = fragments;
    }

    @Override
    public Fragment getItem(int position) {
        return fragments.get(position);
    }

    @Override
    public int getCount() {
        return fragments.size();
    }
}
